import unittest
from HolidayTest import HolidayTest
from Entities.Calendars.RepeatingHoliday import RepeatingHoliday
from datetime import date

class RepeatingHolidayTest (HolidayTest):
    
    def setUp (self):
        self.rd  = RepeatingHoliday ("Test", 10,20)
        self.d1  = date (2011,10,20)
        self.d2  = date (2011,10,21)

    def testHoliday(self):
        self.assertTrue  (self.rd.isholiday (self.d1))
        self.assertFalse (self.rd.isholiday (self.d2))

def Suite ():
    return unittest.TestLoader().loadTestsFromTestCase(RepeatingHolidayTest)
        
if __name__ == '__main__':
    unittest.TextTestRunner().run(Suite())
